<template>
	<!-- 热门分类组件 -->
	<view class="topic-nav">
		<view class="flex-between">
			<view>热门分类</view>
			<view class="flex" @tap="moreTap">
				更多 
				<view class="icon iconfont icon-jinru"></view>
			</view>
		</view>
		<view class="flex">
			<block v-for="(item, index) in nav" :key="index">
				<view class="flex-row flex1">{{ item.name }}</view>
			</block>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			nav: Array
		},
		methods:{
			moreTap() {
				uni.navigateTo({
					url:'../../pages/topic-nav/topic-nav'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	// 热门分类
	.topic-nav{
		border-top: 1upx solid #F0F0F0;
		border-bottom: 1upx solid #F0F0F0;
		padding: 10upx 20upx;
		& > view {
			&:first-child {
				& > view {
					color: #969696;
					&:first-child {
						color: #333333;
						font-size: 32upx;
					}
					&:last-child {
						
					}
				}
			}
			&:last-child {
				padding: 10upx 0;
				& > view {
					background-color: #F0F0F0;
					color: #9e9e9e;
					border-radius: 5upx;
					margin: 0 10upx;
					&:first-child {
						margin-left: 0;
					}
					&:last-child {
						margin-right: 0;
					}
				}
			}
		}
	}
</style>
